package it.puzzler.gdx.ui.puzzle;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;

public class Element extends Actor {

	TextureRegion region;

	public Element() {
		super();
	}

	public void initTextureRegion(Texture texture, float x, float y, float x2, float y2) {
		region = new TextureRegion(texture, x, y, x2, y2);
	}

	@Override
	public void draw(SpriteBatch batch, float parentAlpha) {

		batch.setColor(1, 1, 1, parentAlpha);
		batch.draw(region, getX(), getY(), getWidth(), getHeight());
	}

}
